<?php

/**
 * permissions
 *  @OA\Schema(
 *       schema="Permissions",
 *       description="Permissions-权限",
 *       @OA\Property(
 *            property="id",
 *            type="number"
 *       ),
 *      @OA\Property(
 *            property="permission_name",
 *            type="string",
 *            description="菜单名称"
 *       ),
 *       @OA\Property(
 *            property="parent_id",
 *            type="number",
 *            description="父级ID"
 *      ),
 *      @OA\Property(
 *            property="level",
 *            type="string",
 *            description="层级"
 *       ),
 *       @OA\Property(
 *            property="route",
 *            type="string",
 *            description="路由",
 *       ),
 *     @OA\Property(
 *            property="icon",
 *            type="string",
 *            description="菜单图标",
 *       ),
 *     @OA\Property(
 *            property="module",
 *            type="string",
 *            description="模块",
 *       ),
 *     @OA\Property(
 *            property="creator_id",
 *            type="number",
 *            description="创建人ID",
 *       ),
 *     @OA\Property(
 *            property="permission_mark",
 *            type="string",
 *            description="权限标识",
 *       ),
 *     @OA\Property(
 *            property="component",
 *            type="string",
 *            description="组件名称",
 *       ),
 *     @OA\Property(
 *            property="redirect",
 *            type="string",
 *            description="跳转地址",
 *       ),
 *     @OA\Property(
 *            property="keepalive",
 *            type="number",
 *            description="1 缓存 2 不存在",
 *       ),
 *     @OA\Property(
 *            property="type",
 *            type="number",
 *            description="1 菜单 2 按钮",
 *       ),
 *     @OA\Property(
 *            property="hidden",
 *            type="number",
 *            description="1 显示 2 隐藏",
 *       ),
 *     @OA\Property(
 *            property="sort",
 *            type="number",
 *            description="排序字段",
 *       ),
 *     @OA\Property(
 *            property="created_at",
 *            type="string",
 *            description="创建时间"
 *       ),
 *     @OA\Property(
 *            property="updated_at",
 *            type="string",
 *            description="更新时间",
 *     ),
 *     @OA\Property(
 *            property="deleted_at",
 *            type="string",
 *            description="删除状态，null 未删除 timestamp 已删除",
 *     ),
 *     @OA\Property(
 *            property="children",
 *            type="array",
 *            @OA\Items(ref="#/components/schemas/Permissions")
 *     )
 * )
 *
 * @OA\Get(path="/permissions",
 *   tags={"permissions"},
 *   summary="权限列表",
 *   operationId="getPermissions",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/pageSize"),
 *   @OA\Parameter(ref="#/components/parameters/current"),
 *   @OA\Parameter(ref="#/components/parameters/keyword"),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/QueryResponse")
 *   )
 * )
 *
 *
 * @OA\Post(path="/permissions",
 *   tags={"permissions"},
 *   summary="创建权限",
 *   operationId="createPermissions",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\RequestBody(
 *     @OA\MediaType(
 *       mediaType="application/json",
 *         @OA\Schema(ref="#/components/schemas/Permissions")
 *       )
 *     ),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 *
 * @OA\Put(path="/permissions/{id}",
 *   tags={"permissions"},
 *   summary="更新权限",
 *   operationId="updatePermissions",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/id"),
 *   @OA\RequestBody(
 *     @OA\MediaType(
 *       mediaType="application/json",
 *         @OA\Schema(ref="#/components/schemas/Permissions")
 *       )
 *     ),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 * @OA\Put(path="/permissions/show/{id}",
 *   tags={"permissions"},
 *   summary="显示/隐藏",
 *   operationId="switchShowPermissions",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/id"),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 *
 * @OA\Delete (path="/permissions/{id}",
 *   tags={"permissions"},
 *   summary="删除权限",
 *   operationId="deletePermissions",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/id"),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 */